package com.leyou.auth.web;

import com.leyou.auth.dto.AliOssSignatureDTO;
import com.leyou.auth.service.AliAuthService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName : AliAuthController  //类名
 * @Description : 阿里oss  //描述
 * @Author : qingfeng  //作者
 * @Date: 2020-09-17 15:55  //时间
 */
@RestController
@RequestMapping("ali")
public class AliAuthController {

    private AliAuthService aliAuthService;
    public AliAuthController(AliAuthService aliAuthService){
        this.aliAuthService = aliAuthService;
    }

    @GetMapping("/oss/signature")
    public ResponseEntity<AliOssSignatureDTO> getAliSignature(){
        /**
         * @Description //TODO 申请oss签名
         * @Param []
         * @return org.springframework.http.ResponseEntity<com.leyou.auth.dto.AliOssSignatureDTO>
         */
        return ResponseEntity.ok(aliAuthService.getSignature());
    }
}
